package org.example.springmvc.configuation;

import org.example.springmvc.model.Student;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

@Configuration
public class BeanFiguation {

    @Bean
    public Student student1() {
        Student student = new Student();
        student.setId(11);
        student.setName("遇事");
        student.setAge(11);
        return student;
    }
    @Bean
    public Student student2() {
        Student student = new Student();
        student.setId(22);
        student.setName("问春风乄");
        student.setAge(22);
        return student;
    }
}
